<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class UserRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'username' => 'required|string|max:100',
            'password' => 'nullable|string|max:100',
            'nickname' => 'required|string|max:100',
            'mobile'   => 'nullable|string|max:100',
            'avatar'   => 'nullable|string|max:255',
            'status'   => 'nullable|in:0,1',
            'deptId'   => 'required|integer',
            'email'    => 'nullable|string|max:100',
            'gender'   => 'nullable|string',
            'roleIds'  => 'required|array',
        ];
    }
}
